home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0087_Reading Device Names 2.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  745b  |  35 lines

  1. {
  2. │ In the SWAG archive, there is one good unit to do all that. But ther
  3. │ is one MAJOR bug: you have to know the device name (e.g. MSCD001, sa
  4. │ to access the information on the CD, like tracks, durations, etc. I
  5. │ not found a way to know it by software. If someone knows, well... le
  6. │ me know.
  7. From: magnush@programmers.bbs.no (Magnus Holm)
  8. }
  9. procedure initcd;assembler;
  10. asm
  11.   mov cd_installed,false
  12.   mov ax,1100h
  13.   int 2fh
  14.   mov cd_initresult,al
  15.   cmp al,$ff
  16. ne @@1
  17.   mov cd_installed,true
  18.  
  19. { MSCDEX version? }
  20.  
  21.   mov ax,150ch
  22.   int 2fh
  23.   mov mscdex_version,BX
  24.  
  25. { How many players? }
  26.  
  27.   mov ax,1500h
  28.   mov bx,0000h
  29.   int 2fh
  30.   mov cd_drivecount,bx
  31.   mov cd_startch,cx     { Starts on drive nr }
  32.  
  33. @@1:
  34. end;
  35.